﻿@inherits LoginForm

<div class="login">
    <div class="login-left">
        <div class="slogan">@Config.App.Name</div>
        <div class="image"><img src="_content/Known.Demo/img/login.jpg" /></div>
    </div>
    <div class="login-form">
        <h1>用户登录</h1>
        <Form Model="@Model" OnFinish="OnUserLogin" LabelCol="null">
            <FormItem>
                <Input @bind-Value="@context.UserName" Placeholder="用户名">
                    <Prefix><Icon Type="user" /></Prefix>
                </Input>
            </FormItem>
            <FormItem>
                <InputPassword @bind-Value="@context.Password" Placeholder="密码">
                    <Prefix><Icon Type="lock" /></Prefix>
                </InputPassword>
            </FormItem>
            <FormItem>
                <Switch @bind-Checked="@context.Remember" /> 记住用户名
            </FormItem>
            <FormItem>
                <Button Type="@ButtonType.Primary" HtmlType="submit" Block>登 录</Button>
            </FormItem>
        </Form>
    </div>
</div>
<div class="copyright">
    <span>©2020-@DateTime.Now.ToString("yyyy")</span>
    <span>Powered By</span>
    <a href="http://known.pumantech.com" target="_blank">Known</a>
</div>

@code {
    protected override void OnInitialized()
    {
        base.OnInitialized();
        Model.UserName = "Admin";
        Model.Password = "888888";
    }
}